package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.DashBoardVO;
import com.cskaoyan.service.HomepageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 商城首页
 */

@RestController
@RequestMapping("admin")
public class HomepageController {

    @Autowired
    HomepageService homepageService;

    @RequestMapping("dashboard")
    public BaseRespVo dashboard() {
        DashBoardVO dashBoardVO = homepageService.queryDashBoard();
        return BaseRespVo.ok(dashBoardVO);
    }
}
